<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('meeting/checkpicture/lists')}">特装审图</a></li>
        <li class="active"><a href="{:url('meeting/checkpicture/detail',['id'=>$list['id']])}">详情</a></li>
    </ul>
    <div class="panel-body" style="padding: 0px 15px;">
        <div class="row">
            <form action="{:url('check')}" class="form js-ajax-form" method="post">
                <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
                    <div class="panel panel-default">
                        <div class="panel-heading" role="tab" id="headingOne">
                            <h4 class="panel-title">
                                <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne"
                                   aria-expanded="true" aria-controls="collapseOne">
                                    #1 搭建商资质证明（并提供法人身份证复印件）、展位保险〈均加盖公章〉
                                </a>
                            </h4>
                        </div>
                        <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel"
                             aria-labelledby="headingOne">
                            <div class="panel-body">
                                <div id="photos" class=" col-xs-12 pic-list unstyled">
                                    <notempty name="list.content">
                                        <foreach name="list.content" item="v">
                                            <div class="col-xs-3">
                                                <img class="images" src="{$v}" style="height:136px;width: 136px;" >
                                            </div>
                                        </foreach>
                                    </notempty>
                                </div>

                            </div>
                        </div>
                    </div>
                    <div class="panel panel-default">
                        <div class="panel-heading" role="tab" id="headingTwo">
                            <h4 class="panel-title">
                                <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
                                   href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
                                    #2 上传手册附件5个〈其中附件1展商加盖公章〉、证件（施工人员的身份证复印件、电工证、高处作业证复印件）〈均加盖公章〉
                                </a>
                            </h4>
                        </div>
                        <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel"
                             aria-labelledby="headingTwo">
                            <div class="panel-body">
                                <div id="photos2" class=" col-xs-12 pic-list unstyled">
                                    <notempty name="list.content2">
                                        <foreach name="list.content2" item="v2">
                                            <div class="col-xs-3">
                                                <img class="images" src="{$v2}" style="height:136px;width: 136px;" >
                                            </div>
                                        </foreach>
                                    </notempty>

                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="panel panel-default">
                        <div class="panel-heading" role="tab" id="headingThree">
                            <h4 class="panel-title">
                                <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
                                   href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
                                    #3 效果图（提供正面、侧面、俯视彩色图可标注尺寸）〈均加盖公章〉
                                </a>
                            </h4>
                        </div>
                        <div id="collapseThree" class="panel-collapse collapse" role="tabpanel"
                             aria-labelledby="headingThree">
                            <div class="panel-body">
                                <div id="photos3" class=" col-xs-12 pic-list unstyled">
                                    <notempty name="list.content3">
                                        <foreach name="list.content3" item="v3">
                                            <div class="col-xs-3">
                                                <img class="images" src="{$v3}" style="height:136px;width: 136px;" >
                                            </div>
                                        </foreach>
                                    </notempty>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="panel panel-default">
                        <div class="panel-heading" role="tab" id="heading4">
                            <h4 class="panel-title">
                                <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
                                   href="#collapse4" aria-expanded="false" aria-controls="collapse4">
                                    #4
                                    平面图（标注平面尺寸、配电箱位置、展台区域分布）、电路图（需标注电器回路、负载，相导线的连接和规格，含灯具、电器、开关等分布。并提供灯具合格证）〈均加盖公章〉
                                </a>
                            </h4>
                        </div>
                        <div id="collapse4" class="panel-collapse collapse" role="tabpanel"
                             aria-labelledby="heading4">
                            <div class="panel-body">
                                <div id="photos4" class=" col-xs-12 pic-list unstyled">
                                    <notempty name="list.content4">
                                        <foreach name="list.content4" item="v4">
                                            <div class="col-xs-3">
                                                <img class="images" src="{$v4}" style="height:136px;width: 136px;" >
                                            </div>
                                        </foreach>
                                    </notempty>

                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="panel panel-default">
                        <div class="panel-heading" role="tab" id="heading5">
                            <h4 class="panel-title">
                                <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
                                   href="#collapse5" aria-expanded="false" aria-controls="collapse5">
                                    #5 施工图（全套图纸并要求标注墙体厚度、横梁跨度、门头厚度等尺寸，并提供材质阻燃合格证，地毯阻燃合格证，防火涂料合格证）〈均加盖公章〉
                                </a>
                            </h4>
                        </div>
                        <div id="collapse5" class="panel-collapse collapse" role="tabpanel"
                             aria-labelledby="heading5">
                            <div class="panel-body">
                                <div id="photos5" class=" col-xs-12 pic-list unstyled">
                                    <notempty name="list.content5">
                                        <foreach name="list.content5" item="v5">
                                            <div class="col-xs-3">
                                                <img class="images" src="{$v5}" style="height:136px;width: 136px;" >
                                            </div>
                                        </foreach>
                                    </notempty>


                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="panel panel-default">
                        <div class="panel-heading" role="tab" id="heading6">
                            <h4 class="panel-title">
                                <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
                                   href="#collapse6" aria-expanded="false" aria-controls="collapse6">
                                    #6 简易钢架龙骨图（要求钢木混合结构，标注钢材的壁厚、连接方式、以及详细的尺寸）〈均加盖公章〉
                                </a>
                            </h4>
                        </div>
                        <div id="collapse6" class="panel-collapse collapse" role="tabpanel"
                             aria-labelledby="heading6">
                            <div class="panel-body">
                                <div id="photos6" class=" col-xs-12 pic-list unstyled">
                                    <notempty name="list.content6">
                                        <foreach name="list.content6" item="v6">
                                            <div class="col-xs-3">
                                                <img class="images" src="{$v6}" style="height:136px;width: 136px;" >
                                            </div>
                                        </foreach>
                                    </notempty>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="panel panel-default">
                        <div class="panel-heading" role="tab" id="heading7">
                            <h4 class="panel-title">
                                <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
                                   href="#collapse7" aria-expanded="false" aria-controls="collapse7">
                                    #7 其他
                                </a>
                            </h4>
                        </div>
                        <div id="collapse7" class="panel-collapse collapse" role="tabpanel"
                             aria-labelledby="heading7">
                            <div class="panel-body">
                                <div id="photos7" class=" col-xs-12 pic-list unstyled">
                                    <notempty name="list.content7">
                                        <foreach name="list.content7" item="v7">
                                            <div class="col-xs-3">
                                                <img class="images" src="{$v7}" style="height:136px;width: 136px;" >
                                            </div>
                                        </foreach>
                                    </notempty>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
                <div class="form-group">
                    <label for="">审核</label>
                    <input type="radio" name="status"  <if condition="isset($list['status']) && $list['status'] eq 1">checked</if> value="1">同意
                    <input type="radio" name="status"   <if condition="isset($list['status']) && $list['status'] eq 2">checked</if> value="2">拒绝
                </div>
                <div class="form-group">
                    <label for="">拒绝理由</label>
                    <textarea name="reason" class="form-control" id="" rows="5">{$list['reason']}</textarea>
                </div>
                <div class="row text-center">
                    <input type="hidden" name="id" value="{$list['id']}">
                    <button type="submit" id="submit" class="btn btn-success js-ajax-submit">提交</button>
                </div>
            </form>
            <div id="outerdiv" style="position:fixed;top:0;left:0;background:rgba(0,0,0,0.7);z-index:2;width:100%;height:100%;display:none;">
                <div style="width: 100%;height: 50px;background-color: white;font-size: .8cm;padding-top: 10px;" align="center">
                    查看图片
                </div>
                <div id="innerdiv" style="position:absolute;">
                    <img id="bigimg" style="border:5px solid #fff;" src="" />
                </div>
            </div>
        </div>
    </div>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script>
    $(".images").click(function(){
        var _this = $(this);//将当前的pimg元素作为_this传入函数
        imgShow("#outerdiv", "#innerdiv", "#bigimg", _this);
    });

    function imgShow(outerdiv, innerdiv, bigimg, _this){
        var src = _this.attr("src");//获取当前点击的pimg元素中的src属性
        $(bigimg).attr("src", src);//设置#bigimg元素的src属性

        /*获取当前点击图片的真实大小，并显示弹出层及大图*/
        $("<img/>").attr("src", src).load(function(){
            var windowW = $(window).width();//获取当前窗口宽度
            var windowH = $(window).height();//获取当前窗口高度
            var realWidth = this.width;//获取图片真实宽度
            var realHeight = this.height;//获取图片真实高度
            var imgWidth, imgHeight;
            var scale = 0.8;//缩放尺寸，当图片真实宽度和高度大于窗口宽度和高度时进行缩放

            if(realHeight>windowH*scale) { //判断图片高度
                imgHeight = windowH*scale; //如大于窗口高度，图片高度进行缩放
                imgWidth = imgHeight/realHeight*realWidth; //等比例缩放宽度
                if(imgWidth>windowW*scale) { //如宽度扔大于窗口宽度
                    imgWidth = windowW*scale; //再对宽度进行缩放
                }
            } else if(realWidth>windowW*scale) { //如图片高度合适，判断图片宽度
                imgWidth = windowW*scale; //如大于窗口宽度，图片宽度进行缩放
                imgHeight = imgWidth/realWidth*realHeight; //等比例缩放高度
            } else { //如果图片真实高度和宽度都符合要求，高宽不变
                imgWidth = realWidth;
                imgHeight = realHeight;
            }
            $(bigimg).css("width",imgWidth); //以最终的宽度对图片缩放

            var w = (windowW-imgWidth)/2; //计算图片与窗口左边距
            var h = (windowH-imgHeight)/2; //计算图片与窗口上边距
            $(innerdiv).css({"top":h, "left":w}); //设置#innerdiv的top和left属性
            $(outerdiv).fadeIn("fast"); //淡入显示#outerdiv及.pimg
        });

        $(outerdiv).click(function(){ //再次点击淡出消失弹出层
            $(this).fadeOut("fast");
        });
    }
</script>
</body>
</html>